<?php namespace app\admin\validate;
use think\Validate;
//合作商验证
class Link extends Validate{
	protected $rule =   [
        'cname'        => 'require|max:25',
        'url'          => 'require|url',
        'sort'         => 'require|number|between:1,100',
        'logo'         => 'require',  
        
    ];
    
    protected $message  =   [
        'cname.require'       => '请输入合作商名称！',
        'cname.max'           => '合作商名称最多25个字符！',
        'url.require'         => '请输入合作商链接地址！',
        'url.url'             => '请输入正确的链接地址！',
        'sort.require'        => '请输入合作商排序',
        'sort.number'         => '合作商排序只能是数字',
        'sort.between'        => '合作商排序只能在1-100之间',
        'logo.require'        => '请上传合作商LOGO！',
        
    ];
	
}

